<template>
  <div class="opinion">
    <van-nav-bar title="意见反馈" left-text="返回" left-arrow @click-left="goback" />
    <div class="opinion-content">
      <p>留言</p>
      <div class="text">
        <textarea v-model="opinion" maxlength="150" rows="10" cols="55" style="border:0"> </textarea>
      </div>
    </div>
    <div class="opinion-tel">
      <p>联系方式</p>
      <div>
        <input class="tel" type="text" v-model="tel"/>
      </div>
    </div>

    <div class="submit" @click="submit">
        提交
    </div>
  </div>
</template>

<script>
import {submitAction} from "@/api/user/index"
export default {
    
  name: "WorkspaceJsonIndex",

  data() {
    return {
        opinion:"",
        tel:""
    };
  },

  mounted() {},

  methods: {
    goback(){
        this.$router.go(-1)
    },
    submit(){
        submitAction({
            content:this.opinion,
            name:"张三",
            openId:localStorage.getItem("openId"),
            phone:this.tel
        }).then(res=>{
            console.log(res);
        })
    }
  },
};
</script>

<style scoped lang="scss">
@import "../scss/opinion/index.scss";
* {
  margin: 0;
  padding: 0;
}
</style>